<!DOCTYPE html>
<html lang="en">
<head>
    <title>Title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no, width=device-width">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <script type="text/javascript" src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
</head>
<body>
<button type="button" onclick="pay()">pay</button>
<button type="button" onclick="qrcode()">login</button>
<div id="login_container" style="width: 500px;height: 500px;"></div>
</body>
</html>
<script type="text/javascript">
    var obj = new WxLogin({
        id:"login_container",
        appid: "wx6cf6a0d783b83181",
        scope: "snsapi_login",
        redirect_uri: "http://www.iwooch.com.cn/controller/wx/authorize",
        state: "",
        style: "",
        href: ""
    });
    function pay() {
        location = "/controller/wx/authorize";
//        location = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6cf6a0d783b83181&redirect_uri=http://www.iwooch.com.cn/controller/wx/token&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
    }
    function qrcode() {
        location = "/controller/wx/authorize";
//        location = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx6cf6a0d783b83181&redirect_uri=http://www.iwooch.com.cn/controller/wx/token&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect";
    }
</script>
